<template>
  <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :page-sizes="[3, 5, 8, 10]"
      :page-size="LipeiData.pageSize-0"
      :current-page="LipeiData.currentPage-0"
      layout="total, sizes, prev, pager, next, jumper"
      :total="LipeiData.total"
    ></el-pagination>
  </div>
</template>

<script>
import {createNamespacedHelpers} from "vuex";
const {mapState,mapMutations,mapActions} = createNamespacedHelpers("lipei");
export default {
    props:{
        saleId:String,
    },
    computed:{
        ...mapState(["LipeiData"]),
    },
    created(){
        // console.log(this.saleId);
    },
    methods:{
        ...mapMutations(["setCurrent","setPageSize"]),
        ...mapActions(["getSaleLipeiAsync"]),
        handleSizeChange(val){
            this.setPageSize(val);
            this.getSaleLipeiAsync(this.saleId);
        },
        handleCurrentChange(val){
            this.setCurrent(val);
            this.getSaleLipeiAsync(this.saleId);
        }
    }
}
</script>

<style>

</style>